1. Field of the Invention
The present invention relates to an imaging device for carrying out phase difference focus detection, and in particular relates to an imaging device and control method for an imaging device capable of focus detection with good accuracy, even for a subject that is at an angle with respect to a phase difference detection direction.
2. Description of the Related Art
An imaging device provided with an image sensor having a part thereof that also doubles as a phase difference method focus detection element is conventionally known (for example, Japanese patent application No. 4853071). With this image sensor, generally, pixel data of a focus detection element in a direction perpendicular to an out of focus direction (also called ranging direction or phase difference direction), is added, and an out of focus amount (also called defocus amount) is calculated using this added pixel data.
Also, at the time of phase difference method focus detection, if an angle formed by an optical system and a sensor system is inclined, it results in a ranging error, and so a ranging device to correct this angle has been proposed (Japanese patent laid-open No. 2000-206403). With the ranging device disclosed in this patent publication 2, a distance is detected based on output from a first sensor row 101 and a second sensor row 103 that is arranged at a position separate by a base-line length, as shown in FIG. 11. Also, a third sensor row 101a is arranged parallel with the first sensor row 101, and an angle formed by the optical system and the sensor system is calculated based on output from the first, second and third sensor rows.